<div class="panel panel-default panel-intro">
  <div class="panel-body newrow">
    <form class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST">
      <div class="row">
          <!-- 供应商 -->
          <div class="col-md-4 col-xs-12 form-group">
              <label for="supplierid" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('supplier')}:</label>
              <div class="col-md-8 col-sm-8 col-xs-12">
                <input type="text" class="form-control" id="ShowSupplier" data-toggle="modal" data-target="#ModelSupplier" placeholder="请选择供应商" required readonly />
                <input type="hidden" id="supplierid" name="supplierid" />
              </div>
          </div>
  
          <!-- 供应商手机号 -->
          <div class="col-md-4 col-xs-12 form-group">
              <label class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Mobile')}:</label>
              <div class="col-md-8 col-sm-8 col-xs-12">
                  <input class="form-control" readonly type="text" id="mobile">
              </div>
          </div>
  
          <!-- 供应商地址 -->
          <div class="col-md-4 col-xs-12 form-group">
              <label class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Area')}:</label>
              <div class="col-md-8 col-sm-8 col-xs-12">
                  <div class='control-relative'>
                      <input class="form-control" readonly type="text" id="region" />
                  </div>
              </div>
          </div>
      </div>

      <div class="row">
        <!-- 交货方式 -->
        <div class="col-md-4 col-xs-12 form-group">
            <label class="control-label col-xs-12 col-md-4 col-sm-4">{:__('StorageType')}:</label>
            <div class="col-md-8 col-sm-8 col-xs-12">
            {$typelist}
            </div>
        </div>

        <!-- 总金额 -->
        <div class="col-md-4 col-xs-12 form-group">
            <label for="amount" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('StorageAmount')}:</label>
            <div class="col-md-8 col-sm-8 col-xs-12">
                <input type="number" class="form-control" id="amount" name="amount" value="0.00" data-rule="required;amount" placeholder="{:__('StorageAmount')}" required readonly />
            </div>
        </div>

        <!-- 采购备注 -->
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-remark" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Remark')}:</label>
            <div class="col-md-8 col-sm-8 col-xs-12">
                <textarea id="c-remark" class="form-control" name="remark" placeholder="{:__('Remark')}"></textarea>
            </div>
        </div>
      </div>
      
      <hr>

      <div class="row">
        <!-- 选择商品 开始 -->
        <div class="form-group col-md-12 col-sm-12">
            <div class="col-md-12 col-xs-12 col-sm-12 table-responsive">
            <div id="toolbar" class="toolbar">
              <a class="btn btn-success" data-toggle="modal" data-target="#ModelProduct">
                <i class="fa fa-plus"></i>{:__('Add')}
              </a>
            </div>
            <table id="table" class="table table-striped table-bordered table-hover table-nowrap text-center" width="100%">
                <thead>
                <th>{:__('ID')}</th>
                <th>{:__('ProductName')}</th>
                <th>{:__('ProductStock')}</th>
                <th>{:__('ProductNums')}</th>
                <th>{:__('ProductPrice')}</th>
                <th>{:__('ProductTotal')}</th>
                <th>{:__('Operate')}</th>
                </thead>
                <tbody id="TbodyProduct"></tbody>
            </table>
            </div>
        </div>
        <!-- 选择商品 结束 -->
      </div>

      <div class="form-group layer-footer">
          <label class="control-label col-xs-12 col-sm-2"></label>
          <div class="col-xs-12 col-sm-8">
              <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
              <button type="button" class="btn btn-default btn-embossed btn-close">{:__('Close')}</button>
          </div>
      </div>
    </form>
  </div>
</div>

<!-- 选择供应商弹出框 -->
<div class="modal fade" id="ModelSupplier" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document" style="width:90%;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">{:__('供应商')}</h4>
      </div>
      <div class="modal-body">
        <div id="lays-row" class="row">
          <div id="ToolbarSupplier" class="toolbar">
            {:build_toolbar('refresh')}
          </div>
          <table id="TableSupplier" class="table table-striped table-bordered table-hover">
          </table>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 选择产品弹出框 -->
<div class="modal fade" id="ModelProduct" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document" style="width:90%;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="myModalLabel">{:__('选择商品')}</h4>
      </div>
      <div class="modal-body">
        <div id="lays-row" class="row">
          <div id="ToolbarProduct" class="toolbar">
            {:build_toolbar('refresh')}
          </div>
          <table id="TableProduct" class="table table-striped table-bordered table-hover"></table>
        </div>
      </div>
    </div>
  </div>
</div>